/**********************************************************
 * \file saladtest_main
 * \brief
 * \note	注意事项： 
 *
 *\version 
 ** \author Allen.L
**********************************************************/

#include <time.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>

#include "saladtest_client.h"
#include "saladrpc.pb.h"

#include "phxrpc/file.h"
#define _INIT_FILE_ "../conf/saladtest_client.conf"

using namespace phxrpc;


int main( int argc, char * argv[] )
{

	SaladTestClient::Init( _INIT_FILE_ );

	saladrpc::SALAD_REQUEST req;
    saladrpc::SALAD_RESPONSE resp;

	req.set_union_id(123456789);
	req.set_adbar_id(987654321);
	req.set_adbar_type(1);
	req.set_url("lp112124@163.com");
	req.set_client_ip("127.0.0.1");
	req.set_type(saladrpc::SHOW);

    SaladTestClient client;
    int ret = client.SaladTest( req, &resp );

    printf( "%s return %d\n", __func__, ret );
    printf( "resp: {\n%s}\n", resp.DebugString().c_str() );

	return 0;
}
